package be.gnx.log4jeclipse.perspective.view;

import org.apache.log4j.spi.LoggingEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

import be.gnx.log4jeclipse.perspective.widget.Log4JEntryWidget;

public class Log4JEntryView extends ViewPart implements Log4JEntriesEvents {

  private Log4JEntryWidget log4JEntryWidget;

  public void selectedLoggingEvent(LoggingEvent loggingEvent) {
    log4JEntryWidget.setLoggingEvent(loggingEvent);
  }

  @Override
  public void createPartControl(Composite parent) {
    Log4JEntriesView.addLog4JEntriesEvents(this);
    log4JEntryWidget = new Log4JEntryWidget(parent, SWT.NONE);
  }

  @Override
  public void setFocus() {
  }

}
